<?php
$DB_SERVER = "localhost";
$DB_USERNAME = 'nginx';
$DB_PASSWORD = "root1234";
$DB_NAME = "itdb";

$con=mysqli_connect($DB_SERVER,$DB_USERNAME,$DB_PASSWORD);
if($con=mysqli_connect($DB_SERVER,$DB_USERNAME,$DB_PASSWORD)){
    echo "<script type='text/javascript'>alert('后台数据库连接成功');</script>";
}
else{
    echo "<script type='text/javascript'>alert('后台数据库连接失败');</script>";
}
$conn=mysqli_connect($con,$DB_NAME);

//其他页面调用链接数据库语句
//include('../script/mysqlconnect.php');
?>


